representation of sparse matrix using array in data structure